# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:ios)

platform :ios do
desc "打测试包上传到蒲公英"
    lane :pgy do
        currentTime = Time.new.strftime("%Y-%m-%d-%H-%M-%S")
        outputDirectory = "./fastlane/archives/#{currentTime}"
        archivePath = "#{outputDirectory}/InternetHospital.xcarchive"
        #increment_build_number_in_plist(target:"InternetHospital")
        #increment_version_number_in_plist(
        # target:"InternetHospital",
        #  version_number: "1.0.1"
        #)
        build_app(
            workspace: "InternetHospital.xcworkspace",
            scheme: "InternetHospital",
            clean: true,
            silent: true,
            export_method: "ad-hoc",
            output_directory: outputDirectory,
            archive_path: archivePath
        )
    
        #蒲公英的配置 替换为自己的api_key和user_key
        #pgyer(api_key: "0ac2e3bcf7cc1e48b0cf75c717237302", user_key: "628491834312441888fe0b39ae6fb1c7", update_description: "该版本更新的内容")
    end  
end
